home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRWWWWWWWWTTTTooookkkkeeeennnniiiizzzzeeeerrrr((((3333CCCC++++++++)))) RRRRWWWWWWWWTTTTooookkkkeeeennnniiiizzzzeeeerrrr((((3333CCCC++++++++))))
-
-
-
- NNNNaaaammmmeeee
- RWWTokenizer - Rogue Wave library class
-
- SSSSyyyynnnnooooppppssssiiiissss
- #include <rw/wtoken.h>
-
-
-
- RWWString str("a string of tokens", RWWString::ascii);
- RWWTokenizer(str); // Lex the above string
-
-
-
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- Class RRRRWWWWWWWWTTTTooookkkkeeeennnniiiizzzzeeeerrrr is designed to break a string up into separate tokens,
- delimited by arbitrary "white space." It can be thought of as an
- iterator for strings and as an alternative to the C library function
- wwwwssssttttooookkkk(((()))) which has the unfortunate side effect of changing the string
- being tokenized.
-
- PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
- None
-
- EEEExxxxaaaammmmpppplllleeee
- #include <rw/wtoken.h>
- #include <rw/rstream.h>
- main(){
- RWWString a(L"Something is rotten in the state of Denmark");
- RWWTokenizer next(a); // Tokenize the string a
- RWWString token; // Will receive each token
- // Advance until the null string is returned:
- while (!(token=next()).isNull())
- cout << token << "0;
- }
-
-
- PPPPrrrrooooggggrrrraaaammmm oooouuuuttttppppuuuutttt::::
-
- Something
- is
- rotten
- in
- the
- state
- of
- Denmark
-
- PPPPuuuubbbblllliiiicccc CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
- RWWTokenizer(const RWWString& s);
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRWWWWWWWWTTTTooookkkkeeeennnniiiizzzzeeeerrrr((((3333CCCC++++++++)))) RRRRWWWWWWWWTTTTooookkkkeeeennnniiiizzzzeeeerrrr((((3333CCCC++++++++))))
-
-
-
- Construct a tokenizer to lex the string ssss.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnn
- RWWSubString
- ooooppppeeeerrrraaaattttoooorrrr(((())));
-
-
- Advance to the next token and return it as a substring. The tokens are
- delimited by any of the four wide characters in LLLL"""" 0000. (space, tab,
- newline and null).
-
- RWWSubString
- ooooppppeeeerrrraaaattttoooorrrr(((())))(const wchar_t* s);
-
-
- Advance to the next token and return it as a widesubstring. The tokens
- are delimited by any wide character in ssss, or any embedded wide null.
-
- RWWSubString
- ooooppppeeeerrrraaaattttoooorrrr(((())))(const wchar_t* s,size_t num);
-
-
- Advance to the next token and return it as a substring. The tokens are
- delimited by any of the first nnnnuuuummmm wide characters in ssss.... Buffer ssss may
- contain embedded nulls, and must contain at least nnnnuuuummmm wide characters.
- Tokens will not be delimited by nulls unless ssss contains nulls.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-